TOPDIR=../..

ifeq ($(TEST_PATH),)
	TEST_PATH=${TOPDIR}
endif

ifeq ($(TEST_DPDK),)
	TEST_DPDK=${TOPDIR}/dpdk/x86_64-native-linuxapp-gcc
endif

LIBS+= -L${TEST_PATH}/lib -Wl,--whole-archive,-lfstack,--no-whole-archive
LIBS+= -L${TEST_DPDK}/lib -Wl,--whole-archive,-ldpdk,--no-whole-archive
LIBS+= -Wl,--no-whole-archive -lrt -lm -ldl -lcrypto -pthread -lnuma

TARGET="test"
all:
	cc -O -gdwarf-2  -I../../lib -o ${TARGET}_server server.c ${LIBS}
	cc -O -gdwarf-2  -I../../lib -o ${TARGET}_client client.c ${LIBS}

.PHONY: clean
clean:
	rm -f *.o ${TARGET}_server ${TARGET}_client
